home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / CodeFragments.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  17.2 KB  |  539 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        CodeFragments.h
  3.  
  4.      Contains:    Public Code Fragment Manager Interfaces.
  5.  
  6.      Version:    Technology:    Mac OS 8.1
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1992-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. /*
  18.    o
  19.    ===========================================================================================
  20.    The Code Fragment Manager API
  21.    =============================
  22. */
  23.  
  24.  
  25. #ifndef __CODEFRAGMENTS__
  26. #define __CODEFRAGMENTS__
  27.  
  28. #ifndef __MACTYPES__
  29.     #include <MacTypes.h>
  30. #endif
  31.  
  32. #ifndef __FILES__
  33.     #include <Files.h>
  34. #endif
  35.  
  36.  
  37.  
  38.  
  39. #if PRAGMA_ONCE
  40. #pragma once
  41. #endif
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT
  48. #pragma import on
  49. #endif
  50.  
  51. #if PRAGMA_STRUCT_ALIGN
  52.     #pragma options align=mac68k
  53. #elif PRAGMA_STRUCT_PACKPUSH
  54.     #pragma pack(push, 2)
  55. #elif PRAGMA_STRUCT_PACK
  56.     #pragma pack(2)
  57. #endif
  58.  
  59. /*
  60.    .
  61.    ===========================================================================================
  62.    General Types and Constants
  63.    ===========================
  64. */
  65.  
  66.  
  67. enum {
  68.     kCFragResourceType            = FOUR_CHAR_CODE('cfrg'),
  69.     kCFragResourceID            = 0,
  70.     kCFragLibraryFileType        = FOUR_CHAR_CODE('shlb'),
  71.     kCFragAllFileTypes            = (long)0xFFFFFFFF
  72. };
  73.  
  74.  
  75. typedef OSType                             CFragArchitecture;
  76. enum {
  77.     kPowerPCCFragArch            = FOUR_CHAR_CODE('pwpc'),
  78.     kMotorola68KCFragArch        = FOUR_CHAR_CODE('m68k'),
  79.     kAnyCFragArch                = 0x3F3F3F3F
  80. };
  81.  
  82. #if TARGET_CPU_PPC
  83. enum {
  84.     kCompiledCFragArch            = kPowerPCCFragArch
  85. };
  86.  
  87. #endif  /* TARGET_CPU_PPC */
  88.  
  89. #if TARGET_CPU_68K
  90. enum {
  91.     kCompiledCFragArch            = kMotorola68KCFragArch
  92. };
  93.  
  94. #endif  /* TARGET_CPU_68K */
  95.  
  96. typedef UInt32                             CFragVersionNumber;
  97. enum {
  98.     kNullCFragVersion            = 0,
  99.     kWildcardCFragVersion        = (long)0xFFFFFFFF
  100. };
  101.  
  102.  
  103. typedef UInt8                             CFragUsage;
  104. enum {
  105.     kImportLibraryCFrag            = 0,                            /* Standard CFM import library.*/
  106.     kApplicationCFrag            = 1,                            /* MacOS application.*/
  107.     kDropInAdditionCFrag        = 2,                            /* Application or library private extension/plug-in*/
  108.     kStubLibraryCFrag            = 3,                            /* Import library used for linking only*/
  109.     kWeakStubLibraryCFrag        = 4                                /* Import library used for linking only and will be automatically weak linked*/
  110. };
  111.  
  112.  
  113. enum {
  114.     kIsCompleteCFrag            = 0,                            /* A "base" fragment, not an update.*/
  115.     kFirstCFragUpdate            = 1                                /* The first update, others are numbered 2, 3, ...*/
  116. };
  117.  
  118.  
  119. enum {
  120.     kCFragGoesToEOF                = 0
  121. };
  122.  
  123.  
  124.  
  125.  
  126. typedef UInt8                             CFragLocatorKind;
  127. enum {
  128.     kMemoryCFragLocator            = 0,                            /* Container is already addressable.*/
  129.     kDataForkCFragLocator        = 1,                            /* Container is in a file's data fork.*/
  130.     kResourceCFragLocator        = 2,                            /* Container is in a file's resource fork.*/
  131.     kNamedFragmentCFragLocator    = 4                                /* ! Reserved for possible future use!*/
  132. };
  133.  
  134.  
  135. /*
  136.    --------------------------------------------------------------------------------------
  137.    A 'cfrg' resource consists of a header followed by a sequence of variable length
  138.    members.  The constant kDefaultCFragNameLen only provides for a legal ANSI declaration
  139.    and for a reasonable display in a debugger.  The actual name field is cut to fit.
  140.    There may be "extensions" after the name, the memberSize field includes them.  The
  141.    general form of an extension is a 16 bit type code followed by a 16 bit size in bytes.
  142.    Only one standard extension type is defined at present, it is used by SOM's searching
  143.    mechanism.
  144. */
  145.  
  146.  
  147.  
  148. union CFragUsage1Union {                                        /* ! Meaning differs depending on value of "usage".*/
  149.     UInt32                             appStackSize;                /* If the fragment is an application. (Not used by CFM!)*/
  150. };
  151. typedef union CFragUsage1Union            CFragUsage1Union;
  152.  
  153. union CFragUsage2Union {                                        /* ! Meaning differs depending on value of "usage".*/
  154.     SInt16                             appSubdirID;                /* If the fragment is an application.*/
  155.     UInt16                             libFlags;                    /* If the fragment is an import library.*/
  156. };
  157. typedef union CFragUsage2Union            CFragUsage2Union;
  158. enum {
  159.                                                                 /* Bit masks for the CFragUsage2Union libFlags variant.*/
  160.     kCFragLibUsageMapPrivatelyMask = 0x0001                        /* Put container in app heap if necessary.*/
  161. };
  162.  
  163.  
  164. union CFragWhere1Union {                                        /* ! Meaning differs depending on value of "where".*/
  165.     UInt32                             spaceID;                    /* If the fragment is in memory.  (Actually an AddressSpaceID.)*/
  166.     OSType                             forkKind;                    /* If the fragment is in an arbitrary byte stream fork.*/
  167. };
  168. typedef union CFragWhere1Union            CFragWhere1Union;
  169.  
  170. union CFragWhere2Union {                                        /* ! Meaning differs depending on value of "where".*/
  171.     UInt16                             forkInstance;                /* If the fragment is in an arbitrary byte stream fork.*/
  172. };
  173. typedef union CFragWhere2Union            CFragWhere2Union;
  174. enum {
  175.     kDefaultCFragNameLen        = 16
  176. };
  177.  
  178.  
  179.  
  180. struct CFragResourceMember {
  181.     CFragArchitecture                 architecture;
  182.     UInt16                             reservedA;                    /* ! Must be zero!*/
  183.     UInt8                             reservedB;                    /* ! Must be zero!*/
  184.     UInt8                             updateLevel;
  185.     CFragVersionNumber                 currentVersion;
  186.     CFragVersionNumber                 oldDefVersion;
  187.     CFragUsage1Union                 uUsage1;
  188.     CFragUsage2Union                 uUsage2;
  189.     CFragUsage                         usage;
  190.     CFragLocatorKind                 where;
  191.     UInt32                             offset;
  192.     UInt32                             length;
  193.     CFragWhere1Union                 uWhere1;
  194.     CFragWhere2Union                 uWhere2;
  195.     UInt16                             extensionCount;                /* The number of extensions beyond the name.*/
  196.     UInt16                             memberSize;                    /* Size in bytes, includes all extensions.*/
  197.     unsigned char                     name[16];                    /* ! Actually a sized PString.*/
  198. };
  199. typedef struct CFragResourceMember        CFragResourceMember;
  200. typedef CFragResourceMember *            CFragResourceMemberPtr;
  201.  
  202. struct CFragResourceExtensionHeader {
  203.     UInt16                             extensionKind;
  204.     UInt16                             extensionSize;
  205. };
  206. typedef struct CFragResourceExtensionHeader CFragResourceExtensionHeader;
  207. typedef CFragResourceExtensionHeader *    CFragResourceExtensionHeaderPtr;
  208.  
  209. struct CFragResourceSearchExtension {
  210.     CFragResourceExtensionHeader     header;
  211.     OSType                             libKind;
  212.     unsigned char                     qualifiers[1];                /* ! Actually four PStrings.*/
  213. };
  214. typedef struct CFragResourceSearchExtension CFragResourceSearchExtension;
  215. typedef CFragResourceSearchExtension *    CFragResourceSearchExtensionPtr;
  216. enum {
  217.     kCFragResourceSearchExtensionKind = 0x30EE
  218. };
  219.  
  220.  
  221.  
  222. struct CFragResource {
  223.     UInt32                             reservedA;                    /* ! Must be zero!*/
  224.     UInt32                             reservedB;                    /* ! Must be zero!*/
  225.     UInt16                             reservedC;                    /* ! Must be zero!*/
  226.     UInt16                             version;
  227.     UInt32                             reservedD;                    /* ! Must be zero!*/
  228.     UInt32                             reservedE;                    /* ! Must be zero!*/
  229.     UInt32                             reservedF;                    /* ! Must be zero!*/
  230.     UInt32                             reservedG;                    /* ! Must be zero!*/
  231.     UInt16                             reservedH;                    /* ! Must be zero!*/
  232.     UInt16                             memberCount;
  233.     CFragResourceMember             firstMember;
  234. };
  235. typedef struct CFragResource            CFragResource;
  236. typedef CFragResource *                    CFragResourcePtr;
  237. typedef CFragResourcePtr *                CFragResourceHandle;
  238. enum {
  239.     kCurrCFragResourceVersion    = 1
  240. };
  241.  
  242.  
  243. #define AlignToFour(aValue)    (((aValue) + 3) & ~3)
  244. #define kBaseCFragResourceMemberSize    (offsetof ( CFragResourceMember, name ) )
  245. #define kBaseCFragResourceSize            (offsetof ( CFragResource, firstMember.name ) )
  246. #define NextCFragResourceMemberPtr(aMemberPtr)    \
  247.         ((CFragResourceMemberPtr) ((BytePtr)aMemberPtr + aMemberPtr->memberSize))
  248. #define FirstCFragResourceExtensionPtr(aMemberPtr)                                            \
  249.         ((CFragResourceExtensionHeaderPtr) ((BytePtr)aMemberPtr +                            \
  250.                                             AlignToFour ( kBaseCFragResourceMemberSize +    \
  251.                                                           aMemberPtr->name[0] + 1 ) ))
  252. #define NextCFragResourceExtensionPtr(anExtensionPtr)                    \
  253.         ((CFragResourceExtensionHeaderPtr) ((BytePtr)anExtensionPtr +    \
  254.                                             ((CFragResourceExtensionHeaderPtr)anExtensionPtr)->extensionSize ))
  255. #define FirstCFragResourceSearchQualifier(searchExtensionPtr)                    \
  256.         ((StringPtr) ((BytePtr)searchExtensionPtr +                                \
  257.                       offsetof ( CFragResourceSearchExtension, qualifiers ) ))
  258. #define NextCFragResourceSearchQualifier(searchQualifierPtr)    \
  259.         ((StringPtr) ((BytePtr)searchQualifierPtr +    searchQualifierPtr[0] + 1))
  260.  
  261. typedef struct OpaqueCFragConnectionID*  CFragConnectionID;
  262. typedef struct OpaqueCFragClosureID*     CFragClosureID;
  263. typedef struct OpaqueCFragContainerID*     CFragContainerID;
  264. typedef struct OpaqueCFragContextID*     CFragContextID;
  265.  
  266. typedef UInt32                             CFragLoadOptions;
  267. enum {
  268.     kReferenceCFrag                = 0x0001,                        /* Try to use existing copy, increment reference counts.*/
  269.     kFindCFrag                    = 0x0002,                        /* Try find an existing copy, do not increment reference counts.*/
  270.     kPrivateCFragCopy            = 0x0005                        /* Prepare a new private copy.  (kReferenceCFrag | 0x0004)*/
  271. };
  272.  
  273.  
  274. enum {
  275.     kUnresolvedCFragSymbolAddress = 0
  276. };
  277.  
  278.  
  279. typedef UInt8                             CFragSymbolClass;
  280. enum {
  281.     kCodeCFragSymbol            = 0,
  282.     kDataCFragSymbol            = 1,
  283.     kTVectorCFragSymbol            = 2,
  284.     kTOCCFragSymbol                = 3,
  285.     kGlueCFragSymbol            = 4
  286. };
  287.  
  288.  
  289. /*
  290.    .
  291.    ===========================================================================================
  292.    Macros and Functions
  293.    ====================
  294. */
  295.  
  296.  
  297. #define CFragHasFileLocation(where)    \
  298.         ( ((where) == kDataForkCFragLocator) || ((where) == kResourceCFragLocator) )
  299. EXTERN_API( OSErr )
  300. GetSharedLibrary                (ConstStr63Param         libName,
  301.                                  CFragArchitecture         archType,
  302.                                  CFragLoadOptions         loadFlags,
  303.                                  CFragConnectionID *    connID, /* can be NULL */
  304.                                  Ptr *                    mainAddr, /* can be NULL */
  305.                                  Str255                 errMessage) /* can be NULL */        THREEWORDINLINE(0x3F3C, 0x0001, 0xAA5A);
  306.  
  307. EXTERN_API( OSErr )
  308. GetDiskFragment                    (const FSSpec *            fileSpec,
  309.                                  UInt32                 offset,
  310.                                  UInt32                 length,
  311.                                  ConstStr63Param         fragName, /* can be NULL */
  312.                                  CFragLoadOptions         loadFlags,
  313.                                  CFragConnectionID *    connID, /* can be NULL */
  314.                                  Ptr *                    mainAddr, /* can be NULL */
  315.                                  Str255                 errMessage) /* can be NULL */        THREEWORDINLINE(0x3F3C, 0x0002, 0xAA5A);
  316.  
  317. EXTERN_API( OSErr )
  318. GetMemFragment                    (void *                    memAddr,
  319.                                  UInt32                 length,
  320.                                  ConstStr63Param         fragName, /* can be NULL */
  321.                                  CFragLoadOptions         loadFlags,
  322.                                  CFragConnectionID *    connID, /* can be NULL */
  323.                                  Ptr *                    mainAddr, /* can be NULL */
  324.                                  Str255                 errMessage) /* can be NULL */        THREEWORDINLINE(0x3F3C, 0x0003, 0xAA5A);
  325.  
  326. EXTERN_API( OSErr )
  327. CloseConnection                    (CFragConnectionID *    connID)                                THREEWORDINLINE(0x3F3C, 0x0004, 0xAA5A);
  328.  
  329. EXTERN_API( OSErr )
  330. FindSymbol                        (CFragConnectionID         connID,
  331.                                  ConstStr255Param         symName,
  332.                                  Ptr *                    symAddr, /* can be NULL */
  333.                                  CFragSymbolClass *        symClass) /* can be NULL */            THREEWORDINLINE(0x3F3C, 0x0005, 0xAA5A);
  334.  
  335. EXTERN_API( OSErr )
  336. CountSymbols                    (CFragConnectionID         connID,
  337.                                  long *                    symCount)                            THREEWORDINLINE(0x3F3C, 0x0006, 0xAA5A);
  338.  
  339. EXTERN_API( OSErr )
  340. GetIndSymbol                    (CFragConnectionID         connID,
  341.                                  long                     symIndex,
  342.                                  Str255                 symName, /* can be NULL */
  343.                                  Ptr *                    symAddr, /* can be NULL */
  344.                                  CFragSymbolClass *        symClass) /* can be NULL */            THREEWORDINLINE(0x3F3C, 0x0007, 0xAA5A);
  345.  
  346.  
  347. /*
  348.    .
  349.    ===========================================================================================
  350.    Initialization & Termination Routines
  351.    =====================================
  352. */
  353.  
  354.  
  355. /*
  356.    -----------------------------------------------------------------------------------------
  357.    A fragment's initialization and termination routines are called when a new incarnation of
  358.    the fragment is created or destroyed, respectively.  Exactly when this occurs depends on
  359.    what kinds of section sharing the fragment has and how the fragment is prepared.  Import
  360.    libraries have at most one incarnation per process.  Fragments prepared with option
  361.    kPrivateCFragCopy may have many incarnations per process.
  362.    The initialization function is passed a pointer to an initialization information structure
  363.    and returns an OSErr.  If an initialization function returns a non-zero value the entire
  364.    closure of which it is a part fails.  The C prototype for an initialization function is:
  365.           OSErr    CFragInitFunction    ( const CFragInitBlock *    initBlock );
  366.    The termination procedure takes no parameters and returns nothing.  The C prototype for a
  367.    termination procedure is:
  368.           void    CFragTermProcedure    ( void );
  369.    Note that since the initialization and termination routines are themselves "CFM"-style
  370.    routines whether or not they have the "pascal" keyword is irrelevant.
  371. */
  372.  
  373.  
  374. /*
  375.    -----------------------------------------------------------------------------------------
  376.    ! Note:
  377.    ! The "System7" portion of these type names was introduced during the evolution towards
  378.    ! the now defunct Copland version of Mac OS.  Copland was to be called System 8 and there
  379.    ! were slightly different types for System 7 and System 8.  The "generic" type names were
  380.    ! conditionally defined for the desired target system.
  381.    ! Always use the generic types, e.g. CFragInitBlock!  The "System7" names have been kept
  382.    ! only to avoid perturbing code that (improperly) used the target specific type.
  383. */
  384.  
  385.  
  386.  
  387. struct CFragSystem7MemoryLocator {
  388.     LogicalAddress                     address;
  389.     UInt32                             length;
  390.     Boolean                         inPlace;
  391.     UInt8                             reservedA;                    /* ! Must be zero!*/
  392.     UInt16                             reservedB;                    /* ! Must be zero!*/
  393. };
  394. typedef struct CFragSystem7MemoryLocator CFragSystem7MemoryLocator;
  395.  
  396. struct CFragSystem7DiskFlatLocator {
  397.     FSSpecPtr                         fileSpec;
  398.     UInt32                             offset;
  399.     UInt32                             length;
  400. };
  401. typedef struct CFragSystem7DiskFlatLocator CFragSystem7DiskFlatLocator;
  402. /* ! This must have a file specification at the same offset as a disk flat locator!*/
  403.  
  404. struct CFragSystem7SegmentedLocator {
  405.     FSSpecPtr                         fileSpec;
  406.     OSType                             rsrcType;
  407.     SInt16                             rsrcID;
  408.     UInt16                             reservedA;                    /* ! Must be zero!*/
  409. };
  410. typedef struct CFragSystem7SegmentedLocator CFragSystem7SegmentedLocator;
  411.  
  412. struct CFragSystem7Locator {
  413.     SInt32                             where;
  414.     union {
  415.         CFragSystem7DiskFlatLocator     onDisk;
  416.         CFragSystem7MemoryLocator         inMem;
  417.         CFragSystem7SegmentedLocator     inSegs;
  418.     }                                 u;
  419. };
  420. typedef struct CFragSystem7Locator        CFragSystem7Locator;
  421. typedef CFragSystem7Locator *            CFragSystem7LocatorPtr;
  422.  
  423. struct CFragSystem7InitBlock {
  424.     CFragContextID                     contextID;
  425.     CFragClosureID                     closureID;
  426.     CFragConnectionID                 connectionID;
  427.     CFragSystem7Locator             fragLocator;
  428.     StringPtr                         libName;
  429.     UInt32                             reservedA;                    /* ! Must be zero!*/
  430. };
  431. typedef struct CFragSystem7InitBlock    CFragSystem7InitBlock;
  432. typedef CFragSystem7InitBlock *            CFragSystem7InitBlockPtr;
  433.  
  434. typedef CFragSystem7InitBlock             CFragInitBlock;
  435. typedef CFragSystem7InitBlockPtr         CFragInitBlockPtr;
  436. /* These init/term routine types are only of value to CFM itself.*/
  437. typedef CALLBACK_API_C( OSErr , CFragInitFunction )(const CFragInitBlock *initBlock);
  438. typedef CALLBACK_API_C( void , CFragTermProcedure )(void );
  439. /*
  440.    .
  441.    ===========================================================================================
  442.    Old Name Spellings
  443.    ==================
  444. */
  445.  
  446.  
  447. /*
  448.    -------------------------------------------------------------------------------------------
  449.    We've tried to reduce the risk of name collisions in the future by introducing the phrase
  450.    "CFrag" into constant and type names.  The old names are defined below in terms of the new.
  451. */
  452.  
  453.  
  454. enum {
  455.     kLoadCFrag                    = kReferenceCFrag
  456. };
  457.  
  458.  
  459. #if OLDROUTINENAMES
  460. #define IsFileLocation        CFragHasFileLocation
  461. typedef CFragConnectionID                 ConnectionID;
  462. typedef CFragLoadOptions                 LoadFlags;
  463. typedef CFragSymbolClass                 SymClass;
  464. typedef CFragInitBlock                     InitBlock;
  465. typedef CFragInitBlockPtr                 InitBlockPtr;
  466. typedef CFragSystem7MemoryLocator         MemFragment;
  467. typedef CFragSystem7DiskFlatLocator     DiskFragment;
  468. typedef CFragSystem7SegmentedLocator     SegmentedFragment;
  469. typedef CFragSystem7Locator             FragmentLocator;
  470. typedef CFragSystem7LocatorPtr             FragmentLocatorPtr;
  471. typedef CFragSystem7MemoryLocator         CFragHFSMemoryLocator;
  472. typedef CFragSystem7DiskFlatLocator     CFragHFSDiskFlatLocator;
  473. typedef CFragSystem7SegmentedLocator     CFragHFSSegmentedLocator;
  474. typedef CFragSystem7Locator             CFragHFSLocator;
  475. typedef CFragSystem7LocatorPtr             CFragHFSLocatorPtr;
  476. enum {
  477.     kPowerPCArch                = kPowerPCCFragArch,
  478.     kMotorola68KArch            = kMotorola68KCFragArch,
  479.     kAnyArchType                = kAnyCFragArch,
  480.     kNoLibName                    = 0,
  481.     kNoConnectionID                = 0,
  482.     kLoadLib                    = kLoadCFrag,
  483.     kFindLib                    = kFindCFrag,
  484.     kNewCFragCopy                = kPrivateCFragCopy,
  485.     kLoadNewCopy                = kPrivateCFragCopy,
  486.     kUseInPlace                    = 0x80,
  487.     kCodeSym                    = kCodeCFragSymbol,
  488.     kDataSym                    = kDataCFragSymbol,
  489.     kTVectSym                    = kTVectorCFragSymbol,
  490.     kTOCSym                        = kTOCCFragSymbol,
  491.     kGlueSym                    = kGlueCFragSymbol,
  492.     kInMem                        = kMemoryCFragLocator,
  493.     kOnDiskFlat                    = kDataForkCFragLocator,
  494.     kOnDiskSegmented            = kResourceCFragLocator,
  495.     kIsLib                        = kImportLibraryCFrag,
  496.     kIsApp                        = kApplicationCFrag,
  497.     kIsDropIn                    = kDropInAdditionCFrag,
  498.     kFullLib                    = kIsCompleteCFrag,
  499.     kUpdateLib                    = kFirstCFragUpdate,
  500.     kWholeFork                    = kCFragGoesToEOF,
  501.     kCFMRsrcType                = kCFragResourceType,
  502.     kCFMRsrcID                    = kCFragResourceID,
  503.     kSHLBFileType                = kCFragLibraryFileType,
  504.     kUnresolvedSymbolAddress    = kUnresolvedCFragSymbolAddress
  505. };
  506.  
  507. enum {
  508.     kPowerPC                    = kPowerPCCFragArch,
  509.     kMotorola68K                = kMotorola68KCFragArch
  510. };
  511.  
  512. #endif  /* OLDROUTINENAMES */
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519. #if PRAGMA_STRUCT_ALIGN
  520.     #pragma options align=reset
  521. #elif PRAGMA_STRUCT_PACKPUSH
  522.     #pragma pack(pop)
  523. #elif PRAGMA_STRUCT_PACK
  524.     #pragma pack()
  525. #endif
  526.  
  527. #ifdef PRAGMA_IMPORT_OFF
  528. #pragma import off
  529. #elif PRAGMA_IMPORT
  530. #pragma import reset
  531. #endif
  532.  
  533. #ifdef __cplusplus
  534. }
  535. #endif
  536.  
  537. #endif /* __CODEFRAGMENTS__ */
  538.  
  539.